package com.lelouch.bestpractice.mongorepository.service.impl;

import com.lelouch.bestpractice.mongorepository.domain.TestEntity;
import com.lelouch.bestpractice.mongorepository.repository.TestEntityRepository;
import com.lelouch.bestpractice.mongorepository.service.TestEntityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author lcy
 * @create 2018-09-18 16:33
 */
@Service
public class TestEntityServiceImpl implements TestEntityService {
    @Autowired
    private TestEntityRepository testEntityRepository;


    @Override
    public TestEntity add(TestEntity testEntity) {
        return testEntityRepository.save(testEntity);
    }
}
